import {useSelector} from 'react-redux'
import Item from '../Item'
import './index.css'

export default function List() {
  const todos = useSelector(state => state.todos)
  return (
    <ul className="todo-main">
      {todos.map(todo => {
        return <Item todo={todo} key={todo.id}/>
      })}
    </ul>
  )
}
